<template>
    <div style="height:89%; overflow-y: auto;">
        <to-pou :params="params" :user="user" ></to-pou>
        <!-- <top-ji :user="user"></top-ji> -->
        <tab-active :taskTime="taskTime" @checkHandel="checkHandel"></tab-active>
        <task @gameIndex="gameIndex" v-if="index == 0"  :taskList="taskList" :cumulateDays="cumulateDays"></task>
            <task-staus v-if="index == 1" :list="compeletedList"></task-staus>
    </div>
</template>

<script>
import ToPou from './personInforma.vue'
import TopJi from './TopJi.vue';
import tabActive from './tabActive.vue';
import task from './task.vue';
import TaskStaus from './taskStaus.vue';
export default {
    components: {
        ToPou,
        TopJi, 
        tabActive,
        task,
        TaskStaus
    },
    props: {
        user: {
            type: [Object, String],
            default: () => { }
        },
         cumulateDays: {
            type: Array,
            default: () => []
        },
        taskTime: {
            type: String,
            default:() => ''
        },
        taskList: {
            type: Array,
            default:() => []
        },
        compeletedList: {
            type: Array,
            default: () => []
        },
        params: {
            type: [Object, String],
            default: () => { }
        },
    },
    data() {
        return {
            index:0
        }
    },
    methods: {
        gameIndex(i) {
        this.$emit('gameIndex', i)
       },
        checkHandel(data) {
            this.index = data
            this.$emit('checkHandel',data)
        }
    }
}
</script>

<style lang="scss" scoped>

</style>